books %>%mutate(Author =as.factor(Author), Title =as.factor(Title), `Type of Ban`=as.factor(`Type of Ban`), State =as.factor(State), District =as.factor(District), `Date of Challenge/Removal`=as.factor(`Date of Challenge/Removal`), `Origin of Challenge`=as.factor(`Origin of Challenge`)) %>%select(Author, Title, `Type of Ban`, State, `Date of Challenge/Removal`, `Origin of Challenge`) %>%datatable(filter="top", options =list(pageLength =5, autoWidth =TRUE), rownames=FALSE)
Top 7 Most Banned Books
Show the code
topbooks %>%select(image = image_url, Title, Author, numTimesBanned) %>%gt()%>%gt_img_rows(columns = image,img_source="local", height =150)%>%tab_header(title ="The Most Banned Books from July 2021 - June 2022") %>%cols_label(Title ="Book Title",image ="Book Cover",Author ="Author",numTimesBanned ="Total Number of Bans" )